# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flask-session
_pkgname=flask_session
pkgver=0.8.0
pkgrel=3
pkgdesc='Adds server-side session support to your Flask application.'
arch=('any')
url='https://pypi.org/project/Flask-Session/#files'
license=('BSD')
depends=('python' 'python-flask')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('28627734d79b93e304f0fecfa1b4571a7877eb0810d13c352c0efacde51bdc52e09ab33c73cdeb6feece940c5febd30e97e09348922d341c5aad72793e032c32')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

